package de.baumann.browser.units;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.youth.banner.loader.ImageLoader;

import de.baumann.browser.api.net.vo.PacketDetail;
import de.baumann.browser.api.net.vo.duobao.Banner;

public class GlideImageLoader extends ImageLoader {
    @Override
    public void displayImage(Context context, Object path, ImageView imageView) {
//        PacketDetail.PacketEntity.ImgEntity imgEntity = (PacketDetail.PacketEntity.ImgEntity) path;
        if (path instanceof Banner){
            Glide.with(context).load(((Banner) path).getImage()).into(imageView);
        }else{
            Glide.with(context).load(path).into(imageView);
        }
    }
}
